package com.java.system.service.impl;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.java.system.common.entity.system.SysMachine;
import com.java.system.dao.SysMachineDao;
import com.java.system.service.SysMachineService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @ClassName: SysMachineServiceImpl
 * @Description:
 * @Version: v1.0.0
 * @Author: Fu Hao
 * @Date: 2019/10/14 0014 下午 1:20
 * Modification History:
 * Date           Author      Version     Description
 * -------------------------------------------------------------
 * 2019/10/14 0014        Fu Hao      v1.0.0         创建
 */

@Service("SysMachineService")
public class SysMachineServiceImpl implements SysMachineService {

    @Autowired
    private SysMachineDao sysMachineDao;

    @Override
    public PageInfo selectMachine(SysMachine sysMachine, Integer page, Integer size, Boolean isDealer) {
        page=(page==null?1:page);
        size=(size==null?1:size);
        PageHelper.startPage(page,size);
        return (PageInfo) sysMachineDao.selectMachine(sysMachine,isDealer);
    }
}
